package lancs.mobilemedia.core.ui.controller.commands;

import lancs.mobilemedia.core.ui.controller.AbstractController;
import lancs.mobilemedia.core.ui.controller.ControllerCommand;
import lancs.mobilemedia.core.ui.controller.PhotoController;
import lancs.mobilemedia.core.ui.controller.ScreenSingleton;
import lancs.mobilemedia.core.util.Constants;

public class ViewPhoto implements ControllerCommand {

	public boolean execute(AbstractController controller) {
		String selectedImageName = ((PhotoController) controller).getSelectedImageName();
		((PhotoController) controller).showImage(selectedImageName);

		increasePhotoNumberOfViews(controller, selectedImageName);

		ScreenSingleton.getInstance().setCurrentScreenName(Constants.IMAGE_SCREEN);
		return true;
	}

	protected void increasePhotoNumberOfViews(AbstractController controller, String selectedImageName) {
	}
}